<?php
namespace app\controllers\admin;

use app\commands\ErrorMsg;
use app\commands\Helper;
use app\commands\Validator;
use app\Services\admin\CountryService;
use yii\web\Controller;


class CountryController extends Controller
{
    public $req = array();
    public $user = array();

    /**
     * 安全 校验 屏蔽
     * 预处理  权限等等操作处理
     */
    public function beforeAction($action){
        $this->req = Helper::in(array_merge($_POST, $_GET));
        $this->user = Helper::checksign($this->req);
        unset($this->req['token']);
        return true;
    }

    /**
     * 获取地区
     */
    public function actionGetList(){
        $req = $this->req;
        $res = CountryService::getInstance()->getCountryList();
        Helper::right_out($req,$res);
    }


}
